package so.shanku.essential.activity;

import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import net.tsz.afinal.annotation.view.ViewInject;
import so.shanku.essential.R;
import so.shanku.essential.activity.base.BaseActivity;
import so.shanku.essential.utils.ExtraKeys;
import so.shanku.essential.utils.StringUtil;

/**
 * Created by Administrator on 2015/9/26.
 */
public class ForgetPasswordThirdActivity extends BaseActivity {
    @ViewInject(id=R.id.fill_view,click = "fill_view_click")
    private LinearLayout fill_view;
	@ViewInject(id = R.id.tv_goto_login, click = "tv_goto_login_click")
	private TextView tv_goto_login;
	@ViewInject(id=R.id.mod_pwd_result_tv)
	private TextView mod_pwd_result_tv;
	private String userPhone;

    /**
     * 空白处 结束
     * @param view
     */
    public void fill_view_click(View view){
        finish();
    }
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		userPhone=getIntent().getStringExtra(ExtraKeys.Key_Msg1);
		setContentView(R.layout.activity_forget_password_third);
		if(StringUtil.isEmail(userPhone)){
			String formatStr=getString(R.string.email_change_success);
			String msg=String.format(formatStr, userPhone);
			mod_pwd_result_tv.setText(Html.fromHtml(msg));
		}
	}

	public void tv_goto_login_click(View view) {
		finish();
	}

	@Override
	public void finish() {
		setResult(RESULT_OK);
		super.finish();
	}
}
